package ModelLayer;

import java.util.ArrayList;

/**
 * 
 * @author DM79 group 5
 * @version 2012.13.12
 */

public class Customer extends Person {
	//instance variables
	private String idCustomer;
	private String cvrNo;
	private String accountNo;
	private ArrayList<Customer> customerList;
	private ArrayList<Order> purchaseHistory;
		
	//constructors		
	public Customer() {			
	}

    public Customer(String idCustomer){
        this.idCustomer = idCustomer;
    }
		
	public Customer(String name,String address,String zipCode,String city,String phoneNo,String email,String idCustomer,String cvrNo,String accountNo)	{
		super(name, address, zipCode, city, phoneNo, email);
		this.idCustomer = idCustomer;
		this.cvrNo = cvrNo;
		this.accountNo = accountNo;
		/**
		 * creates ArrayList containing objects of type Customer
		 */
		customerList = new ArrayList<Customer>();
		/**
		 * creates ArrayList containing objects of type Order
		 */
		purchaseHistory = new ArrayList<Order>();
	}
	    
	/**
	 * getters
	 */
	
	/**
	 * @return the idCustomer
	 */
	public String getIdCustomer() {
		return idCustomer;
	}

	/**
	 * @return the cvrNo
	 */
	public String getCvrNo() {
		return cvrNo;
	}

	/**
	 * @return the accountNo
	 */
	public String getAccountNo() {
		return accountNo;
	}

	/**
	 * @return the customerList
	 */
	public ArrayList<Customer> getCustomerList() {
		return customerList;
	}

	/**
     * @return the purchaseHistory
	 */
	public ArrayList<Order> getPurchaseHistory() {
		return purchaseHistory;
	}

	/**
	 * setters
	 */
		
	/**
	 * @param idCustomer the idCustomer to set
	 */
	public void setIdCustomer(String idCustomer) {
		this.idCustomer = idCustomer;
	}

	/**
	 * @param cvrNo the cvrNo to set
	 */
	public void setCvrNo(String cvrNo) {
		this.cvrNo = cvrNo;
	}

	/**
	 * @param accountNo the accountNo to set
	 */
	public void setAccountNo(String accountNo) {
		this.accountNo = accountNo;
	}

	/**
	 * @param customerList the customerList to set
	 */
	public void setCustomerList(ArrayList<Customer> customerList) {
		this.customerList = customerList;
	}

	/**
	 * @param purchaseHistory the purchaseHistory to set
	 */
	public void setPurchaseHistory(ArrayList<Order> purchaseHistory) {
		this.purchaseHistory = purchaseHistory;
	}	    
}
